package com.ben.multiple.mycat.two.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 哈希值取模
 * 根据分片列的哈希值对分片个数取模，哈希算法为Wang/Jenkins
 * 用法和简单取模相似，规定分片个数和分片列即可。
 *  测试字段 : source : a\b
 * @author BenJin Yin
 * @date 2020/7/17
 */
@Data
@TableName("partition_by_hash_mod")
public class PartitionByHashMod implements Serializable {

    @TableId(value = "id", type = IdType.INPUT)
    private Integer id;

    private String source;

    private Integer amount;

    private String remark;

    private LocalDateTime createTime;

}
